var APIURL = document.location.href.substring(0,document.location.href.lastIndexOf("/"));